package org.domain;

public class Reservation {
	private String confirmationNumber;
	private String reservationDate;
	private boolean bagPresent;
	private boolean disabilityAssistanceNeeded;
	private Customer customer;
	private Flight flight;
	
	public Reservation(Customer customer, Flight flight, 
			boolean hasBag, boolean disabilityAssistanceNeeded, String date) {
		
		this.customer = customer;
		this.flight = flight;
		this.bagPresent = hasBag;
		this.disabilityAssistanceNeeded = disabilityAssistanceNeeded;
		this.reservationDate = date;
	}
	
	//getters
	public String getConfirmationNumber() {
		return confirmationNumber;
	}
	
	public Customer getCustomer() {
		return customer;
	}
	
	public Flight getFlight() {
		return flight;
	}
	
	public String getReservationDate() {
		return reservationDate;
	}
	
	public boolean isBagPresent() {
		return bagPresent;
	}
	
	public boolean isDisabilityAssistanceNeeded() {
		return disabilityAssistanceNeeded;
	}
	
	//Complete method creates a confirmation number indicating reservation is complete
	public String complete(int countOfReservationsDone){
		confirmationNumber = String.format("%06d", countOfReservationsDone);
		return confirmationNumber;
	}
}
